From: Carlos Garnacho Date: Wed, 17 Nov 2021 23:38:11 +0000 (+0100) Subject: lookingGlass: Use lookingGlass dialog for modal grab X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~187 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bad385d15cc730ec47d52fba43ede28d7e066990;p=gnome-shell.git lookingGlass: Use lookingGlass dialog for modal grab We want the whole dialog to handle events while shown. To compensate for the entry not being "grabbed", make it take focus when showing. Part-of: --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index b3e7f2117..93d08f3fa 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -1560,7 +1560,7 @@ class LookingGlass extends St.BoxLayout { if (this._open) return; - if (!Main.pushModal(this._entry, { actionMode: Shell.ActionMode.LOOKING_GLASS })) + if (!Main.pushModal(this, { actionMode: Shell.ActionMode.LOOKING_GLASS })) return; this._notebook.selectIndex(0); @@ -1580,6 +1580,7 @@ class LookingGlass extends St.BoxLayout { }); this._windowList.update(); + this._entry.grab_key_focus(); } close() { @@ -1601,7 +1602,7 @@ class LookingGlass extends St.BoxLayout { duration, mode: Clutter.AnimationMode.EASE_OUT_QUAD, onComplete: () => { - Main.popModal(this._entry); + Main.popModal(this); this.hide(); }, });